package com.ynny.map01;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MapTest02 {
    public static void main(String[] args) {

        //Map<K,V>

        //Map<周杰伦,[双截棍,夜曲]>
        //Map<String, String[] >
        //Map<String, List<String> >
        Map<String, List<String> > map = new HashMap<>();

        List<String> list = new ArrayList<>();
        list.add("双截棍");
        list.add("夜曲");

        List<String> list2 = new ArrayList<>();
        list2.add("浮夸");
        list2.add("十年");

        map.put("周杰伦",list);
        map.put("陈奕迅",list2);

        System.out.println(map);


        List<String> songs = map.get("周杰伦");

        for (int i = 0; i < songs.size(); i++) {

            System.out.println(songs.get(i));
        }


    }
}
